package a03.core.base;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 程序员大黑鱼
 * @date : 2021/11/20 19:27
 * @description : BaseMapper
 */
public interface BaseMapper<T> {

    int insert(T record);

    int insertSelective(T record);

    Integer insertUseGeneratedKeys(T t);

    int insertBatch(@Param("records") List<T> records);

    int updateByPrimaryKey(T record);

    int updateByPrimaryKeySelective(T record);

    T selectByPrimaryKey(Object id);

    List<T> selectByPrimaryKeys(@Param("ids") List<?> ids);

    T selectOneByRecord(T record);

    List<T> selectByRecord(T record);

    int deleteByPrimaryKey(Object id);

    int deleteByPrimaryKeys(@Param("ids") List<?> ids);

    int logicDeleteByPrimaryKey(Object id);

    int logicDeleteByPrimaryKeys(@Param("ids") List<?> ids);
}
